package com.game.business.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
        import com.game.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.game.business.mapper.TSubmoneyRecordMapper;
import com.game.business.domain.TSubmoneyRecord;
import com.game.business.service.ITSubmoneyRecordService;

/**
 * 订单金额记录Service业务层处理
 *
 * @author ruoyi
 * @date 2025-10-13
 */
@Service
public class TSubmoneyRecordServiceImpl extends ServiceImpl<TSubmoneyRecordMapper,TSubmoneyRecord>  implements ITSubmoneyRecordService
{
    @Autowired
    private TSubmoneyRecordMapper tSubmoneyRecordMapper;

    /**
     * 查询订单金额记录
     *
     * @param id 订单金额记录主键
     * @return 订单金额记录
     */
    @Override
    public TSubmoneyRecord selectTSubmoneyRecordById(String id)
    {
        return tSubmoneyRecordMapper.selectTSubmoneyRecordById(id);
    }

    /**
     * 查询订单金额记录列表
     *
     * @param tSubmoneyRecord 订单金额记录
     * @return 订单金额记录
     */
    @Override
    public List<TSubmoneyRecord> selectTSubmoneyRecordList(TSubmoneyRecord tSubmoneyRecord)
    {
        return tSubmoneyRecordMapper.selectTSubmoneyRecordList(tSubmoneyRecord);
    }

    /**
     * 新增订单金额记录
     *
     * @param tSubmoneyRecord 订单金额记录
     * @return 结果
     */
    @Override
    public int insertTSubmoneyRecord(TSubmoneyRecord tSubmoneyRecord)
    {
                tSubmoneyRecord.setCreateTime(DateUtils.getNowDate());
            return tSubmoneyRecordMapper.insertTSubmoneyRecord(tSubmoneyRecord);
    }

    /**
     * 修改订单金额记录
     *
     * @param tSubmoneyRecord 订单金额记录
     * @return 结果
     */
    @Override
    public int updateTSubmoneyRecord(TSubmoneyRecord tSubmoneyRecord)
    {
                tSubmoneyRecord.setUpdateTime(DateUtils.getNowDate());
        return tSubmoneyRecordMapper.updateTSubmoneyRecord(tSubmoneyRecord);
    }

    /**
     * 批量删除订单金额记录
     *
     * @param ids 需要删除的订单金额记录主键
     * @return 结果
     */
    @Override
    public int deleteTSubmoneyRecordByIds(String[] ids)
    {
        return tSubmoneyRecordMapper.deleteTSubmoneyRecordByIds(ids);
    }

    /**
     * 删除订单金额记录信息
     *
     * @param id 订单金额记录主键
     * @return 结果
     */
    @Override
    public int deleteTSubmoneyRecordById(String id)
    {
        return tSubmoneyRecordMapper.deleteTSubmoneyRecordById(id);
    }
}
